package com.shensi.appCollect.service.impl;

import com.shensi.appCollect.service.WxTemplateParamsGeneral;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@Component("WxTemplateCouponDistribution")
public class WxTemplateCouponDistributionParams implements WxTemplateParamsGeneral {

    /**
     * 油站 {{thing2.DATA}}
     * 商品名称 {{thing6.DATA}}
     * 
     *
     * @return
     */
    @Override
    public void setWxTemplateContent(List<String> contents, Map<String, String> templateParams, Map<String, Map<String, String>> data) {
    	if (contents.contains("油站名称")) {
            data.put("thing2", Collections.singletonMap("value", templateParams.get("stationName")));
        }
        if (contents.contains("优惠券名称")) {
            data.put("thing6", Collections.singletonMap("value", templateParams.get("couponContent")));
        }
        
    }
}
